﻿<Window x:Class="WMSSoft.WinKStart.Setting_AddActionCondition"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Name="SettingAddActionCondition"
        Title="{Binding ViewName}" Height="383" Width="300" ResizeMode="NoResize" ShowInTaskbar="False" WindowStartupLocation="CenterOwner"  WindowStyle="ToolWindow">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Label Content="Element" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Grid.Row="0"/>
        <ComboBox SelectedValue="{Binding SelectedGUIElement}" ItemsSource="{Binding GUIElements}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Row="1"/>
        <Label Content="Property" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Grid.Row="2"/>
        <ComboBox SelectedValue="{Binding SelectedPropertyName}" ItemsSource="{Binding ElementProperties, Mode=OneWay}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Row="3"/>
        <Label Content="Operator" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Grid.Row="4"/>
        <ComboBox SelectedValue="{Binding SelectedOperator}" ItemsSource="{Binding Operators}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Row="5" Width="100" HorizontalAlignment="Left"/>
        <Label Content="Value" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Grid.Row="6"/>
        <TextBox Grid.Row="7" Height="23" Margin="0,0,174,0" Text="{Binding ConditionValue}" />
        <Label Content="Data - Length" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Grid.Row="8"/>
        <TextBox Grid.Row="9" Height="23" Margin="0,0,191,0" Text="{Binding ValueLength}" />
        <Label Content="Operator Next Condition" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top" Grid.Row="10"/>
        <ComboBox SelectedValue="{Binding SelectedLogicalOperator}" ItemsSource="{Binding LogicalOperators}" DisplayMemberPath="Value" SelectedValuePath="Key" Grid.Row="11" Width="100" HorizontalAlignment="Left"/>
        <Grid Margin="0,10,0,0" Grid.Row="12">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Button Content="{Binding Cmd_Ok.ViewName}" Grid.Column="0" Height="23" HorizontalAlignment="Right" Margin="0,0,5,0" Width="100" IsDefault="True" Command="{Binding Cmd_Ok.Command}"  CommandParameter="{Binding ElementName=SettingAddActionCondition}"/>
            <Button Content="{Binding Cmd_Close.ViewName}" Grid.Column="1" Height="23" HorizontalAlignment="Left" Margin="5,0,0,0" Width="100" IsCancel="True" Command="{Binding Cmd_Close.Command}"  CommandParameter="{Binding ElementName=SettingAddActionCondition}"/>
        </Grid>        
    </Grid>
</Window>
